<template>
  <div class="home">
    <at-top></at-top>
    <div v-for="nav in navthumbs" :key="nav.id" class="box">
      <img :src="nav.img" alt="" />
      {{ nav.title }}
    </div>
  </div>
</template>

<script setup>
import { onMounted, ref } from 'vue';
import { getNavthumbsApi } from '../api/index';

import AtTop from '../components/AtTop.vue';

const navthumbs = ref([]);

onMounted(async () => {
  const res = await getNavthumbsApi();
  navthumbs.value = res.data;
});
</script>

<style lang="scss" scoped>
.box {
  width: 82px;
  height: 57px;
  background: yellowgreen;
  img {
    width: 40px;
  }
}
</style>
